package cn.wolfcode.luowowo.article.query;

import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class TravelQuery extends QueryObject{

    private Long destId = -1L;
       private  int dayType;          //天数

    private int travelTimeType= -1;//月份
    private int perExpendType =-1; //人均消费
    private int orderType =1 ;//最新
    public String getOrderBy(){
        return orderType ==2 ? "t.viewnum desc" : "t.createTime desc";
    }


    public  TravelCondition getDay(){
        return TravelCondition.TRAVEL_DAYS.get(dayType);
    }
    public  TravelCondition getTravelTimeType(){
        return TravelCondition.TRAVEL_TIME.get(travelTimeType);
    }
    public  TravelCondition getPerExpendType(){
        return TravelCondition.TRAVEL_PRE_EXPENDS.get(perExpendType);
    }

}
